﻿using System;
using System.Windows.Forms;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YArchitech.Revit.MEP.Calculator;

namespace YArchitech.Revit.MEP.Electric.Calculator.Command
{
	[Regeneration(RegenerationOption.Manual)]
	[Transaction(TransactionMode.Manual)]
	public class CmdLightSourceLibrary : IExternalCommand
	{
		public Result Execute(ExternalCommandData cmdData, ref string message, ElementSet elements)
		{
			using (DlgLightSourceLibrary dlgLightSourceLibrary = new DlgLightSourceLibrary())
			{
				if (dlgLightSourceLibrary.ShowDialog() == DialogResult.Cancel)
				{
					return Autodesk.Revit.UI.Result.Cancelled;
				}
			}
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
